Next | Prev | Up | Top | Contents | Index

symmon and Multiprocessor Debugging

On multiprocessor systems, a separate symmon runs on each processor. Breakpoints, however, are shared. When a processor reaches a breakpoint instruction, control is transferred to the symmon associated with that processor. Other processors may continue to run independently until they also happen to hit that breakpoint, which can happen if you set a breakpoint in a kernel function or anywhere in a multiprocessor device driver.

At this point, before the kernel is loaded (through a boot command from command mode), you can disable processors not associated with the console (the console processor is referred to as the master processor) by pressing the <Enter> key on the keyboard. Disabling processors is useful during the initial debugging phase of a multiprocess program because it is easier to debug a multiprocess program first in single-processor mode. This way, you eliminate the usual sorts of bugs before you have to deal with bugs associated specifically with multiprocessing (such as synchronization bugs).

(See also M. Maekawa, A. Oldehoeft, and R. Oldehoeft. Operating Systems Advanced Concepts. The Benjamin/Cummings Publishing Company, Inc., 1987 and A. Silberschatz, J. Peterson, and P. Galvin. Operating System Concepts, Third Edition. Addison Wesley Publishing Company, 1991.)

By default, all device driver software runs only on the master processor. A driver that understands the multiprocessor environment can indicate that it contains semaphored code through a flag in the master file. However, it is still easier to debug drivers initially on a single-processor system.

If you do not disable the non-master processors, processes run on them as usual. If a breakpoint is encountered on that (non-master) processor, or if a <ctrl-A> character sequence is entered on that (non-master) processor's terminal, control transfers to symmon on that processor. Other processors continue to execute kernel (and user) code until they detect a <ctrl-A> character sequence, reach a break instruction, or hit a lock or semaphore held by the stopped CPU.

Debugging on CHALLENGE/Onyx and POWER CHALLENGE/POWER Onyx systems requires only a single ASCII terminal. All symmon output for all CPUs is multiplexed to the one port. To talk to an individual CPU, use the cpu# command. CPUs must be stopped (with the stop command) before you can connect to them. To restart all CPUs, use the C all command.

Note: It may be necessary to use <ctrl-A> several times when entering symmon.


Next | Prev | Up | Top | Contents | Index